package org.luckyjourney.entity.agent;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 智能体对话表
 * @TableName agent_chat_table
 */
@TableName(value ="agent_chat_table")
@Data
public class AgentChatTable implements Serializable {
    /**
     * 智能体对话id
     */
    @TableId(value = "agent_chat_id",type = IdType.AUTO)
    private Integer agentChatId;

    /**
     * 智能体名称
     */
    private String agentName;

    /**
     * 智能体提示词
     */
    private String agentHint;

    /**
     * 智能体头像
     */
    private String agentProfile;

    /**
     * 智能体分类
     */
    private Integer agentCategoryId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 模型id
     */
    private Integer usageModelId;

    /**
     * 音色id
     */
    private Integer usageToneId;

    @TableField(exist = false)
    private String toneName;


    /**
     * 是否推荐(0为不推荐   1为推荐)
     */
    private Integer isRecommend;

    /**
     * 客户id
     */
    private Integer userId;

    /**
     * 公共智能体id
     */
    private Integer agentId;

    //开场白
    @TableField(value = "agent_prologue")
    private String agentPrologue;

    @TableField(exist = false)
    private int chatsCount;

    @TableField(value = "nick_name")
    private String nickName;

    @TableField(value = "is_top")
    private Boolean isTop;

    @TableField(exist = false)
    @ApiModelProperty("智能体开场白+对话(列表)")
    private String agentPrologueAndChat;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 智能体对话id
     */
    public Integer getAgentChatId() {
        return agentChatId;
    }

    /**
     * 智能体对话id
     */
    public void setAgentChatId(Integer agentChatId) {
        this.agentChatId = agentChatId;
    }

    /**
     * 智能体名称
     */
    public String getAgentName() {
        return agentName;
    }

    /**
     * 智能体名称
     */
    public void setAgentName(String agentName) {
        this.agentName = agentName;
    }

    /**
     * 智能体提示词
     */
    public String getAgentHint() {
        return agentHint;
    }

    /**
     * 智能体提示词
     */
    public void setAgentHint(String agentHint) {
        this.agentHint = agentHint;
    }

    /**
     * 智能体头像
     */
    public String getAgentProfile() {
        return agentProfile;
    }

    /**
     * 智能体头像
     */
    public void setAgentProfile(String agentProfile) {
        this.agentProfile = agentProfile;
    }

    /**
     * 智能体分类
     */
    public Integer getAgentCategoryId() {
        return agentCategoryId;
    }

    /**
     * 智能体分类
     */
    public void setAgentCategoryId(Integer agentCategoryId) {
        this.agentCategoryId = agentCategoryId;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 模型id
     */
    public Integer getUsageModelId() {
        return usageModelId;
    }

    /**
     * 模型id
     */
    public void setUsageModelId(Integer usageModelId) {
        this.usageModelId = usageModelId;
    }

    /**
     * 音色id
     */
    public Integer getUsageToneId() {
        return usageToneId;
    }

    /**
     * 音色id
     */
    public void setUsageToneId(Integer usageToneId) {
        this.usageToneId = usageToneId;
    }

    /**
     * 是否推荐(0为不推荐   1为推荐)
     */
    public Integer getIsRecommend() {
        return isRecommend;
    }

    /**
     * 是否推荐(0为不推荐   1为推荐)
     */
    public void setIsRecommend(Integer isRecommend) {
        this.isRecommend = isRecommend;
    }

    /**
     * 客户id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 客户id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 公共智能体id
     */
    public Integer getAgentId() {
        return agentId;
    }

    /**
     * 公共智能体id
     */
    public void setAgentId(Integer agentId) {
        this.agentId = agentId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AgentChatTable other = (AgentChatTable) that;
        return (this.getAgentChatId() == null ? other.getAgentChatId() == null : this.getAgentChatId().equals(other.getAgentChatId()))
            && (this.getAgentName() == null ? other.getAgentName() == null : this.getAgentName().equals(other.getAgentName()))
            && (this.getAgentHint() == null ? other.getAgentHint() == null : this.getAgentHint().equals(other.getAgentHint()))
            && (this.getAgentProfile() == null ? other.getAgentProfile() == null : this.getAgentProfile().equals(other.getAgentProfile()))
            && (this.getAgentCategoryId() == null ? other.getAgentCategoryId() == null : this.getAgentCategoryId().equals(other.getAgentCategoryId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUsageModelId() == null ? other.getUsageModelId() == null : this.getUsageModelId().equals(other.getUsageModelId()))
            && (this.getUsageToneId() == null ? other.getUsageToneId() == null : this.getUsageToneId().equals(other.getUsageToneId()))
            && (this.getIsRecommend() == null ? other.getIsRecommend() == null : this.getIsRecommend().equals(other.getIsRecommend()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAgentChatId() == null) ? 0 : getAgentChatId().hashCode());
        result = prime * result + ((getAgentName() == null) ? 0 : getAgentName().hashCode());
        result = prime * result + ((getAgentHint() == null) ? 0 : getAgentHint().hashCode());
        result = prime * result + ((getAgentProfile() == null) ? 0 : getAgentProfile().hashCode());
        result = prime * result + ((getAgentCategoryId() == null) ? 0 : getAgentCategoryId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUsageModelId() == null) ? 0 : getUsageModelId().hashCode());
        result = prime * result + ((getUsageToneId() == null) ? 0 : getUsageToneId().hashCode());
        result = prime * result + ((getIsRecommend() == null) ? 0 : getIsRecommend().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", agentChatId=").append(agentChatId);
        sb.append(", agentName=").append(agentName);
        sb.append(", agentHint=").append(agentHint);
        sb.append(", agentProfile=").append(agentProfile);
        sb.append(", agentCategoryId=").append(agentCategoryId);
        sb.append(", createTime=").append(createTime);
        sb.append(", usageModelId=").append(usageModelId);
        sb.append(", usageToneId=").append(usageToneId);
        sb.append(", isRecommend=").append(isRecommend);
        sb.append(", userId=").append(userId);
        sb.append(", agentId=").append(agentId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}